<template>
  <div class="bulk" :style="{ backgroundColor: color }">
    <div class="bulk-box">
      <p class="title">{{ title }}</p>
      <p class="count">{{ count }}</p>
      <p class="percent">{{ percent }}</p>
      <div class="icon" v-if="icon == 'price'">
        <img src="@/assets/price.png" alt="" />
      </div>
      <div class="icon" v-if="icon == 'orderform'">
        <img src="@/assets/orderform.png" alt="" />
      </div>
      <div class="icon" v-if="icon == 'profit'">
        <img src="@/assets/profit.png" alt="" />
      </div>
      <div class="icon" v-if="icon == 'sell'">
        <img src="@/assets/sell.png" alt="" />
      </div>
      <div class="icon" v-if="icon == 'adduser'">
        <img src="@/assets/adduser.png" alt="" />
      </div>
    </div>
  </div>
</template>

<script setup>
import { defineProps, toRefs } from "vue";
let prop = defineProps(["title", "count", "percent", "icon", "color"]);
let { title, count, percent, icon, color } = toRefs(prop);
</script>

<style lang="scss" scoped>
.bulk {
  width: 18%;
  border-radius: 1vmin;
  .bulk-box {
    padding: 0.625rem 1rem;
    box-sizing: border-box;
    position: relative;
    color: #fff;
    .title {
      font-size: 14px;
      white-space: nowrap;
    }
    .count {
      font-size: 20px;
      margin: 5px 0;
    }
    .percent {
      font-size: 12px;
    }
    .icon {
      width: 22%;
      position: absolute;
      right: 0.625rem;
      top: 0.625rem;
      img {
        width: 100%;
      }
    }
  }
}
</style>
